Drop gdk_event_handler_set
authorMatthias Clasen <mclasen@redhat.com>
Sat, 23 Feb 2019 18:56:51 +0000 (13:56 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 23 Feb 2019 19:13:57 +0000 (14:13 -0500)
This is no longer used by GTK.

docs/reference/gdk/gdk4-sections.txt
gdk/gdkevents.c
gdk/gdkevents.h

index 671982e3d8f25b15e85e0739050841733a178540..80fa982dcde9ed3d1dd81ba8c89857de94618ec3 100644 (file)
@@ -662,9 +662,6 @@ gdk_event_get_touchpad_gesture_n_fingers
 gdk_event_get_touchpad_gesture_phase
 gdk_event_get_touchpad_scale
 gdk_event_is_sent
-<SUBSECTION>
-gdk_event_handler_set
-GdkEventFunc
 
 <SUBSECTION>
 gdk_get_show_events
index bbdf0305edb86d3d9b889a92db84dbad99e7ac3e..352ec44919dcc11a25e8a769c35becb5fb8ce07e 100644 (file)
 /* Private variable declarations
  */
 
-static GdkEventFunc   _gdk_event_func = NULL;    /* Callback for events */
-static gpointer       _gdk_event_data = NULL;
-static GDestroyNotify _gdk_event_notify = NULL;
-
 static void gdk_event_constructed (GObject *object);
 static void gdk_event_finalize (GObject *object);
 
@@ -156,11 +152,7 @@ _gdk_event_emit (GdkEvent *event)
   if (gdk_drag_handle_source_event (event))
     return;
 
-  if (gdk_surface_handle_event (event))
-    return;
-
-  if (_gdk_event_func)
-    (*_gdk_event_func) (event, _gdk_event_data);
+  gdk_surface_handle_event (event);
 }
 
 /*********************************************
@@ -415,33 +407,6 @@ _gdk_event_queue_flush (GdkDisplay *display)
     }
 }
 
-/**
- * gdk_event_handler_set:
- * @func: the function to call to handle events from GDK.
- * @data: user data to pass to the function. 
- * @notify: the function to call when the handler function is removed, i.e. when
- *          gdk_event_handler_set() is called with another event handler.
- * 
- * Sets the function to call to handle all events from GDK.
- *
- * Note that GTK+ uses this to install its own event handler, so it is
- * usually not useful for GTK+ applications. (Although an application
- * can call this function then call gtk_main_do_event() to pass
- * events to GTK+.)
- **/
-void 
-gdk_event_handler_set (GdkEventFunc   func,
-                      gpointer       data,
-                      GDestroyNotify notify)
-{
-  if (_gdk_event_notify)
-    (*_gdk_event_notify) (_gdk_event_data);
-
-  _gdk_event_func = func;
-  _gdk_event_data = data;
-  _gdk_event_notify = notify;
-}
-
 /**
  * gdk_event_new:
  * @type: a #GdkEventType 
index f904d8b2de0d38779315747c60e619bee34c3636..73aef444312edc30dc33cb3bee634cf7567d0d41 100644 (file)
@@ -125,18 +125,6 @@ typedef struct _GdkEventPadGroupMode GdkEventPadGroupMode;
 typedef struct _GdkEventSequence    GdkEventSequence;
 typedef union  _GdkEvent           GdkEvent;
 
-/**
- * GdkEventFunc:
- * @event: the #GdkEvent to process.
- * @data: (closure): user data set when the event handler was installed with
- *   gdk_event_handler_set().
- *
- * Specifies the type of function passed to gdk_event_handler_set() to
- * handle all GDK events.
- */
-typedef void (*GdkEventFunc) (GdkEvent *event,
-                             gpointer  data);
-
 /**
  * GdkEventType:
  * @GDK_NOTHING: a special code to indicate a null event.
@@ -446,11 +434,6 @@ gboolean  gdk_events_get_center         (GdkEvent        *event1,
                                          gdouble         *x,
                                          gdouble         *y);
 
-GDK_AVAILABLE_IN_ALL
-void     gdk_event_handler_set         (GdkEventFunc    func,
-                                        gpointer        data,
-                                        GDestroyNotify  notify);
-
 GDK_AVAILABLE_IN_ALL
 void       gdk_event_set_display        (GdkEvent        *event,
                                          GdkDisplay      *display);